package com.example.wendao.view.viewholder;


import android.view.ViewGroup;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import com.example.wendao.R;
import com.example.wendao.common.PageUtils;
import com.example.wendao.common.ViewHolderBind;
import com.example.wendao.model.entity.User;

public class UserViewHolder extends RecyclerView.ViewHolder implements ViewHolderBind<User> {

    private TextView tvUserTest;

    public UserViewHolder(@NonNull ViewGroup viewGroup) {
        super(PageUtils.inflateItemView(viewGroup, R.layout.item_user_test));
        tvUserTest = itemView.findViewById(R.id.tv_user_test);
    }

    @Override
    public void bindTo(User user) {
        tvUserTest.setText("我是" + user.getUserId() + "号用户");
    }

}
